package issr.market.decorators;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.servlet.jsp.PageContext;

import org.displaytag.decorator.DisplaytagColumnDecorator;
import org.displaytag.exception.DecoratorException;
import org.displaytag.properties.MediaTypeEnum;

public class DateDecorator implements DisplaytagColumnDecorator{
	
	@Override
	public Object decorate(Object arg0, PageContext arg1, MediaTypeEnum arg2)
			throws DecoratorException {
		
		SimpleDateFormat sdate = new SimpleDateFormat("dd/MM/yyyy");
		String data = sdate.format(new Date((Long)arg0));
		
		return data;
	}
	
}
